improving system speed



1.

	block out sections of code under different conditions



	for each item

		if item_weight <> 0		// new code, entire section unnecessary in this case


			processing 1
			processing 2
			processing 3
			...
			...
			...
			

2.

	use proper algorithms for sorting, searching etc.


	sorting - quicksort

	searching - binary search (not scanning the list from first to last)


3.

	go over code multiple times


	
	requires some time and effort, however it's generally worthwhile to go over a section of

		code and simplify it at least 10 times before there would be little value in that process

		there is a long process involved in refining code to the simplest form
		
		for one-off tasks that process may not be necessary





	e.g.




	original code



		i = 1
		b = 2
		b = b + total - 2

		while i <= b
	
			c = i^2

			k = sqrt(c) / total

			output k
		wend


		

	final code


		for i = 1 to total
			k = i / total

			output k
		next


